package com.mxpio.erp.common.enums;

public interface PlmEnums {
    /**
     * 项目表
     * 项目状态
     * table: MB_ERP_PLM_PROJECT_INFO
     * dicCode: ERP_PROJECT_INFO_PROSTATUS
     * code: 10-新增,20-立项审核,30-已立项,40-执行中,50-已暂停,60-已完成,70-已终止
     */
    enum ProStatus {
        NEW("10","新增")/*,AUDIT("20","立项审核"),PROJECT("30","已立项")*/,EXECUT("40","执行中"),
        PAUSE("50","已暂停"),FINISH("60","已完成"), END("70","已终止");

        ProStatus(String code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        private String code;
        private String desc;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }

    /**
     *  问题分类表
     *  问题类型
     *  table: MB_ERP_PLM_PROJECT_PROBLEM_SORT
     *  dicCode: ERP_PLM_PROJECT_PROBLEM_TYPE
     *  code: 10-产品设计,20-工艺设计,30-质量策划,40-采购供应,50-物流仓储,60-生产准备,70-设备工装,80-生产过程
     */
    enum ProblemType {//问题分类表 问题类型  MB_ERP_PLM_PROJECT_PROBLEM_SORT
        PRODUCTS("10","产品设计"),CRAFT("20","工艺设计"),MASTERMIND("30","质量策划"),PROCUREMENT("40","采购供应"),
        WARE("50","物流仓储"),SETUP("60","生产准备"), EQUTOOL("70","设备工装"),PROCESS("80","生产过程");

        ProblemType(String code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        private String code;
        private String desc;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }

    /**
     * 任务执行状态
     * table: MB_ERP_PLM_PROJECT_TASK
     * dicCode: ERP_PLM_TASK_EXECUTION_STATUS
     */
    enum ExecutionStatus {
        WAIT_FOR_START("10", "待启动"),
        EXECUTING("20", "执行中"),
        CLOSED("30", "已关闭"),
        FINISHED("40", "已完成");

        ExecutionStatus(String code, String name) {
            this.code = code;
            this.name = name;
        }


        private String code;

        private String name;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    /**
     * 任务日志类型
     * table: MB_ERP_PLM_PROJECT_TASK_EXECUTION_LOG
     * dicCode: ERP_TASK_LOG_TYPE
     */
    enum LogType {
        EXECUTION("execution", "执行"),
        PROBLEM("problem", "问题"),
        CHANGE("change", "变更"),
        COMPLETE("complete", "完工"),
        CLOSE("close", "关闭"),
        COMPLETEWORKFLOW("completeWorkflow", "完成工作流");

        LogType(String code, String name) {
            this.code = code;
            this.name = name;
        }


        private String code;

        private String name;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    /**
     * 项目问题状态
     * table: MB_ERP_PLM_PROJECT_PROBLEM
     * dicCode: ERP_PLM_TASK_PROBLEM_STATUS
     */
    enum ProblemStatus {

        NEW("10", "新增"), PROCESSED("20", "已处理"), AUDITED("30", "已审核");

        ProblemStatus(String code, String name) {
            this.code = code;
            this.name = name;
        }

        private String code;

        private String name;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    /**
     * 项目审核状态
     */
    enum BpmnStatus {
        CREATE("01","开立"),AUDITING("02","审核中"),BACK("10","已退回"),AGREE("20","已立项"),
        NOAGREE("30","已驳回");

        BpmnStatus(String code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        private String code;
        private String desc;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }

    enum DangerStatus {
        AUDIT("10","待评审"),CARRYOUT("20","进行中"),FINISH("30","已完成");

        DangerStatus(String code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        private String code;
        private String desc;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }

    /**
     * 前后置任务关系
     * table: MB_ERP_PLM_PROJECT_TASK
     * dicCode: ERP_PROJECT_TASKS_LINKS
     */
    enum TaskLink {
        END_START("0", "完成-开始"),
        START_START("1", "开始-开始"),
        END_END("2", "完成-完成"),
        START_END("3", "开始-完成");

        TaskLink(String code, String name) {
            this.code = code;
            this.name = name;
        }


        private String code;

        private String name;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    /**
     * 项目-审批操作节点
     * table: MB_ERP_PLM_PROJECT_INFO_AUDIT_RECORDS
     * dicCode: ERP_PLM_INFO_OPERATIONAL_NODES
     */
    enum InfoOperationalNodes {
        PROJECT("10", "立项"), ALTER("20", "变更"), FINISH("30", "终止"),
        END("40", "结项"), TIME_OUT("50","暂停"),RECOVER("60","恢复");

        InfoOperationalNodes(String code, String name) {
            this.code = code;
            this.name = name;
        }


        private String code;

        private String name;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

}
